<%-- 
    Document   : TempalteAdmin
    Created on : Aug 30, 2014, 8:22:19 AM
    Author     : dinhxuan239
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles" %>
<%@ page import="java.io.*,java.util.*" %>
<!DOCTYPE html>
<!DOCTYPE html>
<html lang="en">

<head>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
    <meta name="author" content="">

    <title><tiles:insertAttribute name="titleAdmin"/></title>

    <!-- Bootstrap Core CSS -->
    <link href="../css/bootstrap.min.css" rel="stylesheet">

    <!-- Custom CSS -->
    <link href="../css/sb-admin.css" rel="stylesheet">

    <!-- Morris Charts CSS -->
    <link href="../css/plugins/morris.css" rel="stylesheet">

    <!-- Custom Fonts -->
    <link href="../font-awesome-4.1.0/css/font-awesome.min.css" rel="stylesheet" type="text/css">


</head>

<body>

    <div id="wrapper">
        <!-- Navigation -->
        <nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
            <!-- Brand and toggle get grouped for better mobile display -->
            <div class="navbar-header">
                <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-ex1-collapse">
                    <span class="sr-only">Toggle navigation</span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
                <a class="navbar-brand" href="${pageContext.request.contextPath}/Home.jsp">Admin Bo2S</a>
            </div>

            <!-- Top Menu Items -->
            <ul class="nav navbar-right top-nav">
                <li class="dropdown">
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="fa fa-user"></i> <%
            String urlRederect = (String) session.getAttribute("user");  
           if(urlRederect != null) {            
            out.println(urlRederect);
           } else { 
               RequestDispatcher rd = request.getRequestDispatcher("../MGUser/newjsp.jsp");
            rd.forward(request,response);
            session.removeAttribute("user");
            
            } %> 
            <b class="caret"></b></a>
                    <ul class="dropdown-menu">
                        <li>
                            <a href="../MGUser/profile.jsp"><i class="fa fa-fw fa-user"></i> Profile</a>
                        </li>
                        <li>
                            <a href="#"><i class="fa fa-fw fa-gear"></i> Settings</a>
                        </li>
                        <li class="divider"></li>
                        <li>
                            <a href="${pageContext.request.contextPath}/Logout.jsp"><i class="fa fa-fw fa-power-off"></i> Log Out</a>
                        </li>
                    </ul>
                </li>
            </ul>
            <!-- end top menu-->
            
            <!-- Sidebar Menu Items - These collapse to the responsive navigation menu on small screens -->
            <div class="collapse navbar-collapse navbar-ex1-collapse">
                <ul class="nav navbar-nav side-nav">
                    <li class="active">
                        <a href="../MGUser/managerUser.jsp"><i class="fa fa-fw fa-dashboard"></i> Manager user</a>
                    </li>
                    <li>
                        <a href="../MGProject/project.jsp"><i class="fa fa-fw fa-bar-chart-o"></i> Project</a>
                    </li>
                    <li>
                        <a href="../MGPost/Catelory.jsp"><i class="fa fa-fw fa-table"></i> Catelory</a> 
                    </li>
                    <li>
                        <a href="../MGPost/Article.jsp"><i class="fa fa-fw fa-edit"></i> article</a>
                    </li> 
                </ul>
            </div>
            <!-- /.navbar-collapse -->
        </nav>

        <div id="page-wrapper">

                <!-- /.row -->
                        
                             <tiles:insertAttribute name="contentadmin"/>   
                <!-- /.row -->

            </div>
            <!-- /.container-fluid -->
        </div>    
    <!-- jQuery Version 1.11.0 -->
    <script src="../js/jquery-1.11.0.js"></script>

    <!-- Bootstrap Core JavaScript -->
    <script src="../js/bootstrap.min.js"></script>

    <!-- Morris Charts JavaScript -->
    <script src="../js/plugins/morris/raphael.min.js"></script>
    <script src="../js/plugins/morris/morris.min.js"></script>
    <script src="../js/plugins/morris/morris-data.js"></script>

</body>

</html>

